import request from '@/utils/request'

// 订单列表
export function getOrderList(data, query) {
  return request({
    url: '/wms/omsOrderShop/list',
    method: 'post',
    data: data,
    params: query
  })
}
// 订单详情
export function getDetailData(id) {
  return request({
    url: '/wms/omsOrderShop/' + id,
    method: 'get'
  })
}

// 修改订单
export function changeStatus(data) {
  return request({
    url: '/wms/omsOrderShop',
    method: 'put',
    data: data
  })
}

// 获取指令
export function getInstruct(data) {
  return request({
    url: '/wms/instruct/list',
    method: 'post',
    data: data
  })
}

// 添加指令
export function addInstruct(data) {
  return request({
    url: '/wms/instruct',
    method: 'post',
    data: data
  })
}

// 删除指令
export function delInstruct(id) {
  return request({
    url: '/wms/instruct/' + id,
    method: 'delete'
  })
}

// 更改指令
export function changeInstruct(data) {
  return request({
    url: '/wms/instruct',
    method: 'put',
    data: data
  })
}

// 订单产品
export function orderProduct(data) {
  return request({
    url: '/wms/omsOrderShopItem/list',
    method: 'post',
    data: data
  })
}


export function deleteOrder(data) {
  return request({
    url: '/orderShop/batchDeleteOrder',
    method: 'post',
    data: data
  })
}

// 新增派送订单
export function insertDispatchOrder(data) {
  return request({
    url: '/wms/omsOrderShop/insertDispatchOrder',
    method: 'post',
    data: data
  })
}

// 查询客户运单号列表，没有分页
export function selectOrderList(data) {
  return request({
    url: '/wms/omsPurchaseBox/selectOrderList',
    method: 'post',
    data: data
  })
}

export function getBoxList(data, query) {
  return request({
    url: '/wms/omsPurchaseBox/list',
    method: 'post',
    data: data,
    params: query
  })
}

// 订单废弃
export function invalidOrder(data) {
  return request({
    url: '/wms/omsOrderShop/invalidOrder',
    method: 'post',
    data: data
  })
}